import {teacherInstance} from "@/api/common/util.ts";

export const addTopic = (courseId: string, title: string) => {
    return teacherInstance.post(`/topic/${courseId}/${title}`);
}

export const getTopic = (courseId: string) => {
    return teacherInstance.get(`/topic/${courseId}`);
}
export const getTopicDetail = (topicId: string) => {
    return teacherInstance.get(`/topic/detail/${topicId}`);
}
export const addMessage = (topicId: string, message: string) => {
    return teacherInstance.post(`/topic/message/${topicId}/${message}`)
}

export const getMessage = (topicId: string) => {
    return teacherInstance.get(`/topic/message/${topicId}`);
}